<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="docgen-resources/docgen.css" type="text/css">
  <meta name="generator" content="FreeMarker Docgen (DocBook 5)">
  <title>
    FreeMarker Manual - 2.0
  </title>
    <script type="text/javascript" src="docgen-resources/jquery.js"></script>
    <script type="text/javascript" src="docgen-resources/linktargetmarker.js"></script>
</head>
<body>

    <div class="navigation">
    <div class="breadcrumb">
<span class="breadcrumb">        You are here:
          <a href="index.html">Book</a>
            <b>></b>
          <a href="app.html">Appendixes</a>
            <b>></b>
          <a href="app_versions.html">Versions</a>
            <b>></b>
          2.0
</span>    </div>
    <div class="bookmarks">
<span class="bookmarks">Bookmarks:
<a href="alphaidx.html">Alpha. index</a>, <a href="gloss.html">Glossary</a>, <a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a>, <a href="ref_builtins_alphaidx.html">?builtins</a>, <a href="ref_directive_alphaidx.html">#directives</a>, <a href="ref_specvar.html">.spec_vars</a>, <a href="app_faq.html">FAQ</a>, <a href="api/index.html">API</a>, <a href="../index.html">Home</a></span>    </div>
    <div class="pagers">
      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
<div class="pagerButton"><a href="versions_2_0RC3.html"><span class="hideA">Next page: </span>2.0 RC3</a></div><div class="pagerButton"><a href="versions_2_01.html">Previous page</a></div><div class="pagerButton"><a href="app_versions.html">Parent page</a></div><div class="pagerButton"><a href="index.html">Contents</a></div>      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
    </div>
    </div>

<div id="mainContent">

  
  
  
  
  <h1 class="rank_section1"
        id="pageTopTitle">
<a name="versions_2_0"></a>2.0  </h1>
    
    <div class="toc">
      <p>
        <b>
            Page Contents
        </b>
      </p>
      
  <ul class="noMargin">
      <li style="padding-bottom: 0.5em"><i><a href="#docgen_afterTheTOC">Intro.</a></i></li>
      <li>
        <a href="#autoid_241">Bugfixes</a>
      </li>
      <li>
        <a href="#autoid_242">Changes to the Template language</a>
      </li>
      <li>
        <a href="#autoid_243">Changes to the API</a>
      </li>
      <li>
        <a href="#autoid_244">Miscellany</a>
      </li>
  </ul>
    </div>
    <a name="docgen_afterTheTOC"></a>
    
<p>FreeMarker 2.0 final was released on 18 April 2002. The changes
        with respect to the previous release, 2.0 RC3 are fairly minor.</p>
            
  
  
  
  <h2 class="rank_section2"
        >
<a name="autoid_241"></a>Bugfixes  </h2>


              <div class="itemizedlist">
<ul>
            <li>
              <p>There were a couple of bugs in handling null values, where
              Lazarus did not do the same thing as FreeMarker Classic.
              Traditionally, in FreeMarker, nulls were treated as being
              equivalent to an empty string in the appropriate context. At
              this point, to the best of our knowledge, there is backward
              compatibility with FreeMarker Classic in this respect.</p>
            </li>

            <li>
              <p>Literal strings can now include line breaks. This was a
              backward compatibility issue with FreeMarker Classic that has
              been fixed.</p>
            </li>
          </ul>    </div>

        
            
  
  
  
  <h2 class="rank_section2"
        >
<a name="autoid_242"></a>Changes to the Template language  </h2>


              <div class="itemizedlist">
<ul>
            <li>
              <p>You can use the extra built-in of
              <tt style="color: #A03D10">myString?web_safe</tt> to convert a string to its
              &quot;web-safe&quot; equivalent, where problematic characters such as
              '&lt;' are converted to &amp;lt;.</p>
            </li>

            <li>
              <p>In displaying numbers with a fractional part, the
              rendering apparatus now respects the decimal separator of the
              template's locale, so that, for example, in continental Europe,
              you would see 1,1 and in the U.S. locale, 1.1.</p>
            </li>
          </ul>    </div>

        
            
  
  
  
  <h2 class="rank_section2"
        >
<a name="autoid_243"></a>Changes to the API  </h2>


              <div class="itemizedlist">
<ul>
            <li>
              <p>The <tt style="color: #A03D10">getAsString()</tt> method in the
              <tt style="color: #A03D10">TemplateScalarModel</tt> interface now takes a
              <tt style="color: #A03D10">java.util.Locale</tt> as a parameter. For the most
              part, this is a hook for later use. In the default
              implementation, <tt style="color: #A03D10">SimpleScalar</tt>, this parameter
              is unused. If you are implementing this interface yourself, your
              implementation may ignore the parameter. However, it will be
              appealing for certain implementations.</p>
            </li>

            <li>
              <p>The constructors of <tt style="color: #A03D10">FileTemplateCache</tt>
              have changed. If you are using an absolute directory on the file
              system as the location of your templates, you need to pass in an
              instance of <tt style="color: #A03D10">java.io.File</tt> to indicate the
              location. If you use the constructors that take a string, this
              is taken to mean relative to the classloader classpath.</p>
            </li>
          </ul>    </div>

        
            
  
  
  
  <h2 class="rank_section2"
        >
<a name="autoid_244"></a>Miscellany  </h2>


          <p>The ant build script build.xml now contains a target that
          builds a .war file containing the Hello, World and Guestbook
          examples. It builds a fmexamples.war. For example, if you are using
          Tomcat in its out-of-the-box configuration, you would place this
          under &lt;TOMCAT_HOME&gt;/webapps and then you would use
          http://localhost:8080/fmexamples/servlet/hello and
          http://localhost:8080/fmexamples/servlet/guestbook for the Hello,
          World and Guestbook examples respectively.</p>
          
</div>

    <div class="navigation">
    <div class="pagers">
      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
<div class="pagerButton"><a href="versions_2_0RC3.html"><span class="hideA">Next page: </span>2.0 RC3</a></div><div class="pagerButton"><a href="versions_2_01.html">Previous page</a></div><div class="pagerButton"><a href="app_versions.html">Parent page</a></div><div class="pagerButton"><a href="index.html">Contents</a></div>      <div class="pagersVerticalSpacer"><img src="docgen-resources/img/none.gif" width="1" height="1" alt="" hspace="0" vspace="0" border="0"/></div>
    </div>
    <div class="breadcrumb">
<span class="breadcrumb">        You are here:
          <a href="index.html">Book</a>
            <b>></b>
          <a href="app.html">Appendixes</a>
            <b>></b>
          <a href="app_versions.html">Versions</a>
            <b>></b>
          2.0
</span>    </div>
    </div>

<table border=0 cellspacing=0 cellpadding=0 width="100%">
    <tr>
      <td colspan=2><img src="docgen-resources/img/none.gif" width=1 height=8 alt=""></td>
    <tr>
      <td align="left" valign="top"><span class="smallFooter">
            FreeMarker Manual -- For FreeMarker 2.3.20
            <br>
          HTML generated: 2013-06-27 20:54:33 GMT
      </span></td>
      <td align="right" valign="top"><span class="smallFooter">
          <a href="http://www.xmlmind.com/xmleditor/">
            <img src="docgen-resources/img/xxe.gif" alt="Edited with XMLMind XML Editor">
          </a>
      </span></td>
    </tr>
</table>
  <!-- Put pre-loaded images here: -->
  <div style="display: none">
    <img src="docgen-resources/img/linktargetmarker.gif" alt="Here!" />
  </div>
</body>
</html>

